package com.yiweikeji.project.core;

/**
 * 消息模板枚举
 */
public enum MessageTemplteType {

	/** 保修报事-派单通知 */
	DISPATCH_NOTICE("dispatchNotice", "保修报事-派单通知"),
	/** 物业缴费-缴费提醒通知 */
	PAYMENT_REMINDER_NOTICE("paymentReminderNotice", "物业缴费-缴费提醒通知"),


	;

	private final String code; // 状态码
	private final String desc;

	MessageTemplteType(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

	/**
	 * 通过状态码获取ENUM的名字
	 * 
	 * @param statusCode
	 * @return
	 */
	public static ResultCode getEnumByStatusCode(String code) {
		for (ResultCode p : ResultCode.values()) {
			if (p.code().equalsIgnoreCase(code)) {
				return p;
			}
		}

		return null;
	}
}
